import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from "vuex-persistedstate"
import { Address } from "./modules/address";
import { User } from "./modules/user";
import { Cart } from "./modules/cart";
import { getters } from './getters'
Vue.use(Vuex)

export default new Vuex.Store({

    plugins: [createPersistedState({
        storage: window.localStorage,
        key: 'store'
    })],

    modules: {
        Address,
        User,
        Cart
    },
    getters
})